package com.sakura.oj.judge.codesandbox;

import com.sakura.oj.judge.codesandbox.impl.ExampleCodeSandbox;
import com.sakura.oj.judge.codesandbox.impl.RemoteCodeSandbox;

/**
 * 代码沙箱工厂
 */
public class CodeSandboxFactory {

    public static CodeSandbox newInstance(String type) {
        return switch (type) {
            case "remote" -> new RemoteCodeSandbox();
            default -> new ExampleCodeSandbox();
        };
    }
}
